﻿CREATE TABLE [dbo].[Message]
(
	[MessageId] [uniqueidentifier] DEFAULT newid() NOT NULL,
	[Subject] [nvarchar](150) NOT NULL,
    [Content] [nvarchar](max) NULL,
	[SentOn] [datetime] NULL,
	[Priority] [int] NULL,
    [From] [uniqueidentifier] NOT NULL, -- FK to Person
    [To] [uniqueidentifier] NOT NULL, -- FK to Person
    [IsDeleted] [bit] DEFAULT 0 NOT NULL,
	[CreatedOn] [datetime] DEFAULT getdate() NOT NULL

CONSTRAINT [PK_Message] PRIMARY KEY CLUSTERED 
(
	[MessageId] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]
GO